package com.wtwd.wtwddevice.mapper;

import com.wtwd.wtwddevice.model.entity.DeviceWPhone;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mjy
 * @since 2024-06-12
 */
@Mapper
public interface DeviceWPhoneMapper extends BaseMapper<DeviceWPhone> {

    int deleteByDeviceId(@Param("deviceId") Long deviceId);

    int updateRemoveByDeviceId(@Param("deviceId") Long deviceId,@Param("number") String number,@Param("isRemove") Integer isRemove);

    int batchSave(@Param("list") List<DeviceWPhone> deviceWPhones);

    int isTagDeletion(@Param("deviceId") Long deviceId, @Param("number") String number,@Param("isRemove")Integer isRemove);

    boolean updateState(@Param("deviceId") Long deviceId, @Param("number") String number,@Param("state") int state);
}
